package yolorpc.config;


import jdk.jfr.DataAmount;
import lombok.Data;
import yolorpc.fault.retry.RetryStrategyKeys;
import yolorpc.fault.tolerant.TolerantStrategyKeys;
import yolorpc.loadbalancer.LoadBalancerKeys;
import yolorpc.registry.RegistryConfig;
import yolorpc.serializer.SerializerKey;

/**
 * @author yolo
 * @Program RPC
 * @description RPC框架配置
 * @create 2025-04-24 10:57
 **/
@Data
public class RpcConfig {

    /**
     * 名称
     * */
    private String name = "yolo-rpc";

    /**
     * 版本号
     * */
    private String version = "1.0";

    /**
     * 服务器主机名
     * */
    private String serverHost = "localhost";

    /**
     * 服务器端口
     * */
    private Integer serverPort = 8080;

    /**
     * mock模拟调用
     * */
    private boolean mock = false;

    /**
     * 注册中心配置
     */
    private RegistryConfig registryConfig = new RegistryConfig();

    /**
     * 序列化器
     * */
    private String serializer = SerializerKey.JDK;

    /**
     * 负载均衡器
     */
    private String loadBalancer = LoadBalancerKeys.ROUND_ROBIN;

    /**
     * 重试策略
     */
    private String retryStrategy = RetryStrategyKeys.NO;

    /**
     * 容错机制
     */
    private String tolerantStrategy = TolerantStrategyKeys.FAIL_FAST;
}
